package lq2383;

import java.util.Scanner;
//lq2383，AC
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k=1;
		for(k=1;k<n;k++) {
			int t = (k*(k-1))/2 + k;
			if(t>=n)
				break;
		}
		System.out.println(k);
	}

}
